{% extends "master.html" %}
{% load humanize %}

{% block title %}查看日志 #{{item.id}}{% endblock %}

{% block body %}
	{% if item %}
		<div class="sbjtd">
		创建者   ：{{ item.create_by.first_name }} {{ item.create_by.last_name }}<br/>
		创建时间 : {{ item.create_at|date:"Y/m/d(D)" }} {{ item.create_at|time:"" }}
		<div align="right">
			<a href="/dlog/modify/{{item.id}}/" title="修改">修改</a>&nbsp;|&nbsp;
			<a href="/dlog/delete/{{item.id}}/?next=/dlog/list/" title="删除">删除</a>
		</div>
		</div>
		<b>当天小结：</b><br/>
		{{ item.content|linenumbers|linebreaksbr }}<br/><br/>
		<b>次日安排：</b><br/>
		{{ item.plan|linenumbers|linebreaksbr }}<br/><br/>
		<font color="grey">
		<b>昨天的安排（参考）：</b><br/>
		{{ yestoday.plan|linenumbers|linebreaksbr }}<br/><br/>
		{% if comments %}
		<b>评论：</b><br/>
		<div class="sbjtd">
			{% for comment in comments %}
			<b>{{forloop.counter|ordinal}} {{ comment.create_by.first_name }}{{ comment.create_by.last_name }}说： ({{ comment.create_at }})</b><br/>
			{{ comment.content|linebreaksbr }}<br/><br/>
			{% endfor %}
		</div>
		{% endif %}
		</font>
		<b>你想说些什么？</b>
		<form method="post" onsubmit="urchinTracker('/dlog/comment/id/')" action="/dlog/comment/{{item.id}}/">
		<textarea rows="5" cols="50" name="content"></textarea><br/>
		<input id="submit" type="submit" value="提交" />
		</form>
	{% else %}
		没有 #{{itemid}} 号日志。
	{% endif %}
{% endblock %}